﻿# hello world.py

#    不理解...

def print_matches(matchtext):
	print "Looking for",matchtext
	while True:
		line = (yield)
		if matchtext in line:
			print line
			

matcher = print_matches("Python")
matcher.next()
matcher.send("Hello World")
matcher.send("Python is cool")
matcher.send("yow!")
matcher.close()


matchers = [
	print_matches("python"),
	print_matches("guibo"),
	print_matches("jython")
]

for m in matchers:
	m.next()













